Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Bug page_y url #32119

Merged
merged 3 commits into from
Nov 28, 2024
Merged

FIX Bug page_y url #32119

merged 3 commits into from
Nov 28, 2024

Conversation

zephyriony
Copy link
Contributor

FIX

In some cases, 'reposition' modified the url by assigning variables other than page_y, for example : https://XXX/ticket/card.php?id=2158&action=dellink&token=e88288a7e4488ebafb81a80fa5f58913&dellinkid=20308.60009765625.60009765625&page_y=2113.60009765625

Here, for example, we were unable to delete a linked element, which is logical when you see the contents of dellinkid

In some cases, 'reposition' modified the url by assigning variables other than page_y, for example : 
https://XXX/ticket/card.php?id=2158&action=dellink&token=e88288a7e4488ebafb81a80fa5f58913&dellinkid=20308.60009765625.60009765625&page_y=2113.60009765625
@@ -242,38 +242,28 @@
// Code to manage reposition
print "\n/* JS CODE TO ENABLE reposition management (does not work if a redirect is done after action of submission) */\n";
print '
jQuery(document).ready(function() {
/* If page_y set, we set scrollbar with it */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing all the comments that help to understand the code ?

if (page_y == 0) page_y = jQuery("#page_y").text(); /* search in POST parameter that is filed at bottom of page */
if (page_y > 0)
{
console.log("page_y found is "+page_y);
Copy link
Member

@eldy eldy Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question for console.logthat are necessary to debug.
A bug fix must always have the minimal footprint.

@eldy eldy merged commit d434cd4 into Dolibarr:develop Nov 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants